home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / admin / linuxcon.000 / linuxcon / linuxconf-1.6 / misc / misc.h < prev    next >
C/C++ Source or Header  |  1996-08-03  |  2KB  |  81 lines

  1. #pragma interface
  2. #ifndef MISC_H
  3. #define MISC_H
  4.  
  5. #include <stdio.h>
  6.  
  7. class ARRAY_OBJ{
  8. protected:
  9.     char modified;
  10.     /*~PROTOBEG~ ARRAY_OBJ */
  11. public:
  12.     ARRAY_OBJ (void);
  13.     void rstmodified (void);
  14.     void setmodified (void);
  15.     virtual int was_modified (void);
  16.     virtual ~ARRAY_OBJ (void);
  17.     /*~PROTOEND~ ARRAY_OBJ */
  18. };
  19.  
  20. class ARRAY: public ARRAY_OBJ{
  21. protected:
  22.     int is_owner;    // Is this object allowed to delete
  23.             // the objects it contains ?
  24.     ARRAY_OBJ **tb;
  25.     int nb;
  26.     int maxtb;    // Current maximum length of the table
  27.     int increm;    // growth rate of tb
  28.     /*~PROTOBEG~ ARRAY */
  29. public:
  30.     ARRAY (void);
  31.     void add (ARRAY_OBJ *pt);
  32.     void delall (void);
  33. protected:
  34.     ARRAY_OBJ *getitem (int no)const;
  35. public:
  36.     int getnb (void)const;
  37. protected:
  38.     void grow (void);
  39. public:
  40.     void insert (int pos, ARRAY_OBJ *pt);
  41.     void neverdelete (void);
  42.     int remove (ARRAY_OBJ *obj);
  43.     void remove_all (void);
  44.     void remove_del (ARRAY_OBJ *obj);
  45.     void rstmodified (void);
  46.     void setgrowth (int _increm);
  47.     void sort (int (*cmp)(const ARRAY_OBJ *, const ARRAY_OBJ *));
  48.     virtual int was_modified (void);
  49.     virtual ~ARRAY (void);
  50.     /*~PROTOEND~ ARRAY */
  51. };
  52.  
  53.  
  54. #ifndef CONFIGF_H
  55.     #include "../misc/configf.h"
  56. #endif
  57. #ifndef SSTRING_H
  58.     #include "../misc/sstring.h"
  59. #endif
  60.  
  61. enum MENU_CONTEXT{
  62.     MENU_UNKNOWN,        // Special menu which is unknown to modules
  63.                         // or is not yet module aware
  64.     MENU_NETWORK,        // main network menu
  65.     MENU_MAIN,            // Main linuxconf menu
  66.     MENU_CONTROL,        // Control panel
  67. };
  68.  
  69. class DIALOG;
  70.  
  71. #ifndef DIALOG_H
  72.     #include "../dialog/dialog.h"
  73. #endif
  74.  
  75. #include "misc.p"
  76.  
  77.  
  78. #endif
  79.  
  80.  
  81.